<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>html | 学习笔记</title><meta name="author" content="lzoxun"><meta name="copyright" content="lzoxun"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="HTML   超文本标记语言 ( Hyper Text Markup Language )   构建网页的技术，框架结构, 以.htm&#x2F;.html 结尾的文件 (早期 win95 那种系统扩展名不能超过三个字符) 网页由标签注册，标签和内容组成的部分称为元素  MDN HTML 所有元素  文档标准结构 文档类型声明   H5的申明&lt;!DOCTYPE html&gt; 让浏览器用H5标准去解">
<meta property="og:type" content="article">
<meta property="og:title" content="html">
<meta property="og:url" content="http://example.com/2023/07/22/web/web-html/index.html">
<meta property="og:site_name" content="学习笔记">
<meta property="og:description" content="HTML   超文本标记语言 ( Hyper Text Markup Language )   构建网页的技术，框架结构, 以.htm&#x2F;.html 结尾的文件 (早期 win95 那种系统扩展名不能超过三个字符) 网页由标签注册，标签和内容组成的部分称为元素  MDN HTML 所有元素  文档标准结构 文档类型声明   H5的申明&lt;!DOCTYPE html&gt; 让浏览器用H5标准去解">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png">
<meta property="article:published_time" content="2023-07-22T07:14:09.698Z">
<meta property="article:modified_time" content="2023-07-22T07:14:09.698Z">
<meta property="article:author" content="lzoxun">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="http://example.com/2023/07/22/web/web-html/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":true,"top_n_per_article":1,"unescape":true,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#1f1f1f","position":"bottom-left"},
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'html',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-07-22 15:14:09'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          const now = new Date()
          const hour = now.getHours()
          const isNight = hour <= 6 || hour >= 18
          if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
          else if (t === 'light') activateLightMode()
          else activateDarkMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.3.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>(()=>{
  const $loadingBox = document.getElementById('loading-box')
  const $body = document.body
  const preloader = {
    endLoading: () => {
      $body.style.overflow = ''
      $loadingBox.classList.add('loaded')
    },
    initLoading: () => {
      $body.style.overflow = 'hidden'
      $loadingBox.classList.remove('loaded')
    }
  }

  preloader.initLoading()
  window.addEventListener('load',() => { preloader.endLoading() })

  if (false) {
    document.addEventListener('pjax:send', () => { preloader.initLoading() })
    document.addEventListener('pjax:complete', () => { preloader.endLoading() })
  }
})()</script><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "" data-lazy-src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">108</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">1</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header"><nav id="nav"><span id="blog-info"><a href="/" title="学习笔记"><span class="site-name">学习笔记</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">html</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-07-22T07:14:09.698Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-07-22T07:14:09.698Z" title="更新于 2023-07-22 15:14:09">2023-07-22</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="html"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h3 id="HTML"><a href="#HTML" class="headerlink" title="HTML"></a>HTML</h3><blockquote>
<p>  超文本标记语言 ( Hyper Text Markup Language )</p>
</blockquote>
<ol>
<li>构建网页的技术，框架结构, 以<code>.htm/.html</code> 结尾的文件 (早期 win95 那种系统扩展名不能超过三个字符)</li>
<li>网页由<code>标签</code>注册，<code>标签和内容</code>组成的部分称为<code>元素</code> </li>
<li><a target="_blank" rel="noopener" href="https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element">MDN HTML 所有元素</a></li>
</ol>
<h3 id="文档标准结构"><a href="#文档标准结构" class="headerlink" title="文档标准结构"></a>文档标准结构</h3><ol>
<li><p>文档类型声明 </p>
<ol>
<li>H5的申明<code>&lt;!DOCTYPE html&gt;</code> 让浏览器用H5标准去解析，必须放在最前面，不能省略</li>
<li>其他还有 html4 、XHTML(语法严格)</li>
</ol>
</li>
<li><p>HTML结构  <code>html&gt;(head&gt;title&#123;网页标题&#125;)+body&gt;div&#123;内容 $&#125;*5</code></p>
</li>
</ol>
<hr>
<h3 id="元素"><a href="#元素" class="headerlink" title="元素"></a>元素</h3><hr>
<blockquote>
<p>  元素由 <strong>标签 属性 内容</strong> 组成</p>
</blockquote>
<h4 id="元素标签"><a href="#元素标签" class="headerlink" title="元素标签"></a>元素标签</h4><ol>
<li><p>标签：不区分大小写，建议都小写 <code>&lt;div&gt;</code></p>
</li>
<li><p>单标签( img 、image、meta、… )</p>
<ol>
<li><code>&lt;img /&gt;</code>  <code>斜杆</code>是以前xhtml那种早期版本固定单标签需要加上的，限制<code>不需要</code>了</li>
</ol>
</li>
</ol>
<h4 id="元素属性"><a href="#元素属性" class="headerlink" title="元素属性"></a>元素属性</h4><ol>
<li><p>公共属性 <code>class</code> <code>id</code> <code>style</code></p>
<ol>
<li><p><code>data-*</code> HTML5新增的一个自定义数据属性功能  可以通过 js 与 html 进行数据交互</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// &lt;div id=&quot;node&quot; data-color=&quot;red&quot; data-font-size=&quot;30px&quot;&gt;你好&lt;/div&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> div = <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&quot;node&quot;</span>);</span><br><span class="line"><span class="keyword">var</span> data = div.<span class="property">dataset</span>;</span><br><span class="line"><span class="keyword">var</span> color = div.<span class="property">dataset</span>.<span class="property">color</span>;</span><br><span class="line"><span class="keyword">var</span> fontSize= div.<span class="property">dataset</span>.<span class="property">fontSize</span>;</span><br><span class="line"><span class="variable language_">console</span>.<span class="title function_">log</span>(data);      <span class="comment">//对象</span></span><br><span class="line"><span class="variable language_">console</span>.<span class="title function_">log</span>(color);      <span class="comment">//red</span></span><br><span class="line"><span class="variable language_">console</span>.<span class="title function_">log</span>( fontSize);   <span class="comment">//30px</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// 删除</span></span><br><span class="line"><span class="keyword">delete</span> div.<span class="property">dataset</span>.<span class="property">color</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">//设置自定义的值</span></span><br><span class="line">div.<span class="title function_">setAttribute</span>(<span class="string">&quot;data-font-weight&quot;</span>,<span class="string">&quot;bold&quot;</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment">// 选择器</span></span><br><span class="line"><span class="comment">//选择所有具有data-color属性的元素</span></span><br><span class="line"><span class="keyword">var</span> div = <span class="variable language_">document</span>.<span class="title function_">querySelectorAll</span>(<span class="string">&quot;[data-color]&quot;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">//选择所有data-color属性值为red的元素</span></span><br><span class="line"><span class="keyword">var</span> div = <span class="variable language_">document</span>.<span class="title function_">querySelectorAll</span>(<span class="string">&quot;[data-color=&#x27;red&#x27;]&quot;</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">/**  css</span></span><br><span class="line"><span class="comment">    div[data-class]&#123;</span></span><br><span class="line"><span class="comment">        width: 100px;</span></span><br><span class="line"><span class="comment">    &#125;</span></span><br><span class="line"><span class="comment"> */</span></span><br></pre></td></tr></table></figure>
</li>
<li><p><code>title</code>  将内容完整显示给用户</p>
</li>
</ol>
</li>
<li><p>私有属性 <code>href ...</code></p>
</li>
</ol>
<h4 id="元素内容"><a href="#元素内容" class="headerlink" title="元素内容"></a>元素内容</h4><ol>
<li>实体字符<ol>
<li>如果要用影响结构，或不可见的符号</li>
<li>实体名称 <code>&amp;lt;</code> <code>&amp;gt;</code> <code>&amp;nbsp;</code></li>
<li>实体编号 <code>&amp;#60;</code> <code>&amp;#62;</code> <code>&amp;#160;</code></li>
<li>实体名称对应的实体编码 就是 <a target="_blank" rel="noopener" href="https://www.habaijian.com/">ASCII</a> 的实体编码</li>
</ol>
</li>
</ol>
<h4 id="常用元素"><a href="#常用元素" class="headerlink" title="常用元素"></a>常用元素</h4><ol>
<li><p><strong>html</strong>：整个文档的根元素 <code>:root&#123;&#125;</code>就是设置html元素的样式</p>
<ol>
<li><code>lang</code> 可以帮助<code>语音合成</code>工具确定要使用的发音，或 <code>翻译工具</code>的翻译规则 <code>英文en  简体中文 zh-CN 中文 zh</code> (设置 lang&#x3D;”en” 那么打开页面，谷歌会提示是否翻译弹窗)</li>
</ol>
</li>
<li><p><strong>head</strong> 文档配置信息</p>
<ol>
<li><p><strong>mate</strong></p>
<ol>
<li>字符集<ol>
<li><p>字符集 <code>charset=&quot;utf-8&quot;</code> 必须有，否则容易出现乱码</p>
</li>
<li><p>文本  通过<code>指定字符集编码</code>成二进制给计算机识别，计算机也要通过<code>同样的解码方式</code>将二进制成正常文字显示处理</p>
<p><img src= "" data-lazy-src="/../../static/img/2022-09-03_135559.jpg" alt="过程"></p>
</li>
<li><p>现在一般都用 <code>utf-8</code></p>
</li>
</ol>
</li>
</ol>
</li>
<li><p><code>title</code> </p>
</li>
<li><p>link 外部资源链接</p>
<ol>
<li>ref 设置类型 ， href 引入资源路径</li>
<li>ref &#x3D;”icon|stylesheel|dns-prefetch|preload”    图标 、样式表、指定域名提前解析  、预加载</li>
</ol>
</li>
</ol>
</li>
<li><p><strong>body</strong></p>
<ol>
<li><p>h （利于seo优化） 、p、ul li 、ol li、dl dt dd、from</p>
</li>
<li><p>img  </p>
<ol>
<li>alt ( 加载失败的提示文字 )</li>
<li>src</li>
<li>默认 <code>vertical-align:baseline;</code> 下面留有一条缝隙，值设置 <code>top</code> 或<code>设置成块元素</code>等，就可以清除</li>
</ol>
</li>
<li><p>a ( 锚元素 (anchor) )</p>
<ol>
<li><p>超链接 跳转<code>新链接</code>，获取跳<code>转指定位置</code></p>
</li>
<li><p>href 指定要打开的<code>地址</code> (<code>外部url</code> 、<code>本地地址</code>、<code>文件资源 可下载</code>、<code>协议地址</code>)</p>
<ol>
<li>URL (统一资源定位符号)   URI （标志符 ，包含URL）</li>
</ol>
</li>
</ol>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--协议地址--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;mailto:xx@qq.com&quot;</span>&gt;</span>发送邮件<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br></pre></td></tr></table></figure>

<ol start="3">
<li>target 以什么方式打开 href，_self   _blank   _top(多层iframe最顶层打开)  _parent(多层iframe上层打开) …</li>
<li><code>锚点</code> a 元素的<code>href=&#39;#eleId&#39;</code> 指向某个元素的 id  (实现<code>单页面菜单</code>，或<code>容器滚动到最底部</code>)</li>
</ol>
</li>
<li><p>iframe</p>
<ol>
<li>禁止别人引用 , 页面响应头设置 <code>X-Frame-Options:sameorigin</code> 表示只在同源域名下才能引用</li>
</ol>
</li>
<li><p><code>div</code> <code>span</code> 和<code>strong</code> <code>i</code> 这种元素的来源 </p>
<ol>
<li>早期并没有css样式，为了让页面更好看，所有添加可各种各样包含各种样式的标签</li>
<li>htm基本元素  -&gt;  添加各种strong标签  -&gt; 臃肿不好维护  -&gt; css成为为标准 -&gt; 样式分离，h1 strong i 这些 都能样式实现 -&gt; 出现<code>div/span 盒子 来搭建基本结构</code>，<code>css调样式</code>, 如果有<code>语义化</code>的东西在用对应标签<code>h1 ul p</code> 不好看css再微调</li>
</ol>
</li>
<li><p>table</p>
<ol>
<li>格式 table&gt;(thead&gt;tr&gt;th)(tbody&gt;tr&gt;td)</li>
<li><code>border-collapse:collapse</code>  边框折叠，适合合并td左右边框</li>
<li>常用属性：colspan&#x3D;”2” 跨列 (横向合并)、rowspan&#x3D;”2” 跨行（纵向合并）</li>
<li>caption 表格标题</li>
</ol>
</li>
<li><p>from </p>
<ol>
<li>常用属性: disabled、readonly(只读)、checked （checkbox的默认选择）、autofocus(自动聚焦)、selected(下拉的默认选择)</li>
<li>Input Type <ol>
<li>button 普通按钮</li>
<li>reset 重置，点击有默认行为，from标签内生效 (button type&#x3D;’reset’ 也可以)</li>
<li>submit 提交，点击有默认行为，from标签内生效 </li>
<li>radio 单选</li>
<li>checkbox 多选</li>
</ol>
</li>
<li>Input Name<ol>
<li>用于表单submit时参数key构建</li>
<li>相同Name 在 radio类型input 不能同时选择</li>
<li>相同Name 确定 checkbox 类型input 是否为同一个东西</li>
</ol>
</li>
<li>Input Value<ol>
<li>用于表单submit参数value的构建</li>
</ol>
</li>
<li>label  与某个input，textarea等元素绑定，点击label，就可以激活input ( label 的 for 与 input 的 id 关联 )</li>
<li>textarea 多行输入</li>
</ol>
<pre><code> 1.   cols 指定列数，rows 指定行数
 2.   `css resize:none` 隐藏左下角拉伸的按钮
</code></pre>
<ol start="7">
<li>select option</li>
</ol>
</li>
</ol>
</li>
</ol>
<h3 id="emmet-工具"><a href="#emmet-工具" class="headerlink" title="emmet 工具"></a>emmet 工具</h3><blockquote>
<p>  快速审查html </p>
</blockquote>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">快速生成h5默认结构</span></span><br><span class="line">!</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">属性</span></span><br><span class="line">a[href=&quot;xxxx&quot;]&#123;链接&#125;&gt;span</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">&gt; 子代</span> </span><br><span class="line"><span class="meta prompt_">div&gt;</span><span class="language-bash">ul&gt;li</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">+ 兄弟</span></span><br><span class="line">div+div.tow$</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">批量与内容</span></span><br><span class="line"><span class="meta prompt_">div&gt;</span><span class="language-bash">ul&gt;li*10&#123;文本$&#125;</span> </span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">() 分组</span></span><br><span class="line"><span class="meta prompt_">div&gt;</span><span class="language-bash">(div.div1&gt;div.div1child)+div.div2</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">^ 上级 .div11与.div1同级</span></span><br><span class="line"><span class="meta prompt_">div&gt;</span><span class="language-bash">div.div1&gt;div.div2^div.div11</span></span><br></pre></td></tr></table></figure>

<blockquote>
<p>  css Emmet</p>
</blockquote>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">w100 width:100px</span><br><span class="line">w100+h100 宽高100px  </span><br><span class="line">m20-30-40-50 margin:10px 30px 40px 50px;</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="HTML-关机知识点"><a href="#HTML-关机知识点" class="headerlink" title="HTML 关机知识点"></a>HTML 关机知识点</h3><p><code>文档类型</code> <code>字符集</code> <code>URL</code> <code>SEO</code> <code>元素</code> <code>实体字符</code> <code>元素属性公私属性</code> <code>语义化标签</code> <code>表格</code> <code>表单</code></p>
<p>​	</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="http://example.com">lzoxun</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="http://example.com/2023/07/22/web/web-html/">http://example.com/2023/07/22/web/web-html/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://example.com" target="_blank">学习笔记</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2023/07/22/web/web-css/" title="css"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">css</div></div></a></div><div class="next-post pull-right"><a href="/2023/07/22/web/web-script-es6/" title="ECMAScript"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">ECMAScript</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "" data-lazy-src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">lzoxun</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">108</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">1</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/liaozhongxun"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/liaozhongxun" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:869664233@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">这是我的文档</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#HTML"><span class="toc-number">1.</span> <span class="toc-text">HTML</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%96%87%E6%A1%A3%E6%A0%87%E5%87%86%E7%BB%93%E6%9E%84"><span class="toc-number">2.</span> <span class="toc-text">文档标准结构</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%85%83%E7%B4%A0"><span class="toc-number">3.</span> <span class="toc-text">元素</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%85%83%E7%B4%A0%E6%A0%87%E7%AD%BE"><span class="toc-number">3.1.</span> <span class="toc-text">元素标签</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%85%83%E7%B4%A0%E5%B1%9E%E6%80%A7"><span class="toc-number">3.2.</span> <span class="toc-text">元素属性</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%85%83%E7%B4%A0%E5%86%85%E5%AE%B9"><span class="toc-number">3.3.</span> <span class="toc-text">元素内容</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%B8%B8%E7%94%A8%E5%85%83%E7%B4%A0"><span class="toc-number">3.4.</span> <span class="toc-text">常用元素</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#emmet-%E5%B7%A5%E5%85%B7"><span class="toc-number">4.</span> <span class="toc-text">emmet 工具</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#HTML-%E5%85%B3%E6%9C%BA%E7%9F%A5%E8%AF%86%E7%82%B9"><span class="toc-number">5.</span> <span class="toc-text">HTML 关机知识点</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/window/win-11/" title="win 11 set">win 11 set</a><time datetime="2023-07-22T07:14:09.700Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/window/win-gitbash/" title="git bash">git bash</a><time datetime="2023-07-22T07:14:09.700Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/window/win-wsl/" title="wsl">wsl</a><time datetime="2023-07-22T07:14:09.700Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/window/win-main/" title="window">window</a><time datetime="2023-07-22T07:14:09.700Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/web/%E5%85%BC%E5%AE%B9%E9%97%AE%E9%A2%98/" title="兼容问题">兼容问题</a><time datetime="2023-07-22T07:14:09.699Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By lzoxun</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><div class="js-pjax"></div><script id="canvas_nest" defer="defer" color="0,0,255" opacity="0.7" zIndex="-1" count="99" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-nest.min.js"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div class="no-result" id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></div><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"log":false,"model":{"jsonPath":"/live2dw/assets/haruto.model.json"},"display":{"position":"right","width":100,"height":200,"right":300},"mobile":{"show":true}});</script></body></html>